package kr.hkit.powerjava.chapter12.poly;

import kr.hkit.powerjava.chapter12.RemoteControl;

public class AnonymousTest {
	public static void main(String[] args) {
		long a = System.currentTimeMillis();
		RemoteControl rc = new RemoteControl() {
			@Override
			public void turnOn() {
				System.out.println("켜짐");
			}
			
			@Override
			public void turnOff() {
				System.out.println("꺼짐");
			}
		};
		
		rc.turnOn();
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		rc.turnOff();
		
		long b = System.currentTimeMillis();
		
		System.out.println(b-a);
	}
}	
